package com.cn.ycy;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;

/**
 * springbootapplication 告诉spring这是一个配置类 功能和application.xml一样
 */

@SpringBootApplication(scanBasePackages = {"com.cn.ycy"})
public class BTomcatSpringbootApplication extends SpringBootServletInitializer {

  public static void main(String[] args) {
    SpringApplication.run(BTomcatSpringbootApplication.class, args);
  }

  @Override
  protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
    return application.sources(this.getClass());
  }

}
